import request from '@/utils/request'

/**
 * 物业项目dashboard：预算对标卡片-下钻页
 * @param  projectCode  项目编码
 * @param  yearmonth  年月
 * @param  showType
 */
const queryBudgetListApi = ({ projectCode, yearmonth, showType }) => {
    const data = {
        projectCode,
        yearmonth,
        showType
    }
    return request({
        url: 'portal-server/v1/api/cockpitArrearsProperty/queryBudgetList',
        method: 'post',
        data: data
    })
};
// 物业项目dashboard：预算对标卡片-下钻页 上方卡片
const queryBudgetCardListApi = (data) => {
    return request({
        url: `portal-server/v1/api/cockpitArrearsProperty/queryBudgetListCard`,
        method: 'post',
        data,
    })
};
// 能耗分析-下钻页-表格
const queryEnergyCostsListApi = (data) => {
    return request({
        url: `/portal-server/v1/api/wyReport/wyEnergyModuleInfoCardList`,
        method: 'post',
        data,
    })
};
// 能耗分析-下钻页-折线图表
const energyCostsLineEchartApi = (data) => {
    return request({
        url: `/portal-server/v1/api/wyReport/wyEnergyModuleInfoChartListLine`,
        method: 'post',
        data
    })
};
// 能耗分析-下钻页-饼图图表
const energyCostsPieEchartApi = (data) => {
    return request({
        url: `/portal-server/v1/api/wyReport/wyEnergyModuleInfoChartListPie`,
        method: 'post',
        data
    })
};
// 能耗分析-下钻页-表格导出
const exportEnergyCostsListApi = (data) => {
    return request({
        url: `/portal-server/v1/api/wyReport/wyenergyModuleInfoCardExportList`,
        method: 'post',
        data,
        responseType: 'blob'
    })
};
// 能耗分析-下钻页-图表导出
const exportEnergyCostsEchartApi = (data) => {
    return request({
        url: `/portal-server/v1/api/wyReport/wyEnergyModuleGraphExport`,
        method: 'post',
        data,
        responseType: 'blob'
    })
};
// 欠款分析-明细页
const debtAnalyseInfoListApi = (data) => {
    return request({
        url: `/portal-server/v1/api/propertyDebt/count`,
        method: 'post',
        data,
    })
};
// 欠款分析-明细页-导出
const debtAnalyseInfoExportApi = (data) => {
    return request({
        url: `/portal-server/v1/api/propertyDebt/countExport`,
        method: 'post',
        data,
        responseType: 'blob'
    })
};
// 欠款分析-明细页-房间明细
const debtAnalyseRoomListApi = (data) => {
    return request({
        url: `/portal-server/v1/api/propertyDebt/detail`,
        method: 'post',
        data,
    })
};
// 欠款分析-明细页-房间明细-导出
const debtAnalyseRoomExportApi = (data) => {
    return request({
        url: `/portal-server/v1/api/propertyDebt/detailExport`,
        method: 'post',
        data,
        responseType: 'blob'
    })
};
// 获取区域下拉
const getRegionDropdownDropdownApi = (params) => {
	return request({
		url: `/portal-server/v1/api/propertyDebt/regionDropdown`,
		method: 'get',
		params
	})
};
// 获取楼宇下拉
const getBuildDropdownApi = (params) => {
	return request({
		url: `/portal-server/v1/api/propertyDebt/buildDropdown`,
		method: 'get',
		params
	})
};
// 获取房间下拉
const getRoomDropdownApi = (params) => {
	return request({
		url: `/portal-server/v1/api/propertyDebt/roomDropdown`,
		method: 'get',
		params
	})
};
// 收费项目下拉
const getChargeItemDropdownApi = (params) => {
	return request({
		url: `/portal-server/v1/api/propertyDebt/toolItemDropdown`,
		method: 'get',
		params
	})
};

export default {
    queryBudgetListApi,
    queryBudgetCardListApi,
    queryEnergyCostsListApi,
    energyCostsLineEchartApi,
    energyCostsPieEchartApi,
    exportEnergyCostsListApi,
    exportEnergyCostsEchartApi,
    debtAnalyseInfoListApi,
    debtAnalyseInfoExportApi,
    debtAnalyseRoomListApi,
    debtAnalyseRoomExportApi,
    getRegionDropdownDropdownApi,
    getBuildDropdownApi,
    getRoomDropdownApi,
    getChargeItemDropdownApi,
}
